import time

from po.base.web_base_page import WebBasePage

class Shunt_chuche_page(WebBasePage):


    # 业务操作  ---------搜索
    def sousuo_chuche(self,chepai):
        self.clickElement("chuli_button")
        time.sleep(1)
        self.clickElement("chuche_button")
        self.inputByLocatorName("chuche_sousuo_input",chepai)
        self.clickElement("sousuo_button")

    # 业务操作  ---------新增
    def add_chuche(self,hucsj,sxry,mudidi,chucheyy,kaislc):
        self.clickElement("sousuo_button")
        self.clickElement("dengji_button")
        self.clickElement("chepai_button")
        time.sleep(1)
        self.clickElement("chepainum_button")
        self.clickElement("bumen_button")
        time.sleep(1)
        self.clickElement("bumenxz_button")
        self.clickElement("chuchesj_button")
        time.sleep(1)
        self.clickElement("xzchuchesj_button")
        self.clickElement("qdchuchesj_button")
        time.sleep(1)
        self.inputByLocatorName("huichesj_button",hucsj)
        # time.sleep(1)
        # self.clickElement("xzhuichesj_button")
        # time.sleep(2)
        # self.clickElement("qdhuichesj_button")
        time.sleep(1)
        self.inputByLocatorName("sxry_input", sxry)
        self.clickElement("xzjiasy_button")
        time.sleep(1)
        self.clickElement("qdjiasy_button")
        self.inputByLocatorName("mudidi_input",mudidi)
        self.inputByLocatorName("chucheyy_input", chucheyy)
        self.inputByLocatorName("kaislicinput",kaislc)
        self.clickElement("queding_button")

    # 业务操作  ---------新增

    def add_huiche(self,chepai,hcgl):
        self.clear("chuche_sousuo_input")
        self.inputByLocatorName("chuche_sousuo_input", chepai)
        self.clickElement("sousuo_button")
        self.clickElement("xzchepai")
        self.clickElement("djhuche")
        self.inputByLocatorName("huichelc_input",hcgl)
        self.clickElement("qdhuic_button")